<?php

declare(strict_types=1);

use Hyperf\Server\Event;
use Hyperf\Server\ServerInterface;

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
return [
    'servers' => [
//        [
//            'name' => 'jsonrpc-http',
//            'type' => ServerInterface::SERVER_HTTP,
//            'host' => '0.0.0.0',
//            'port' => 9504,
//            'sock_type' => SWOOLE_SOCK_TCP,
//            'callbacks' => [
//                Event::ON_REQUEST => [\Hyperf\JsonRpc\HttpServer::class, 'onRequest'],
//            ],
//        ],
//        [
//            'name' => 'tcp',
//            'type' => Server::SERVER_BASE,
//            'host' => '0.0.0.0',
//            'port' => 9504,
//            'sock_type' => SWOOLE_SOCK_TCP,
//            'callbacks' => [
//                Event::ON_RECEIVE => [\Yolo\Service\Service::class, 'onReceive'],
//            ],
//            'settings' => [
//                // 按需配置
//            ],
//        ],
    ],
    'consumers' => [
        [
            // The service name, this name should as same as with the name of service provider.
            'name' => 'YourServiceName',
            // The service registry, if `nodes` is missing below, then you should provide this configs.
            'registry' => [
                'protocol' => 'consul',
                'address' => 'Enter the address of service registry',
            ],
            // If `registry` is missing, then you should provide the nodes configs.
            'nodes' => [
                // Provide the host and port of the service provider.
                // ['host' => 'The host of the service provider', 'port' => 9502]
            ],
        ],
    ],
];
